package adv1;

import java.util.Arrays;

/**
 * @author oldliu
 * @since 1.0
 */
public class SystemTest2 {
    public static void main(String[] args) {
        //数组扩容
        int []ar={1,4,6,7,8,9,10};
        int a3[]=new int[30];
        //
//        for(int i=0;i<ar.length;i++){
//            a3[i]=ar[i];
//        }
        //一步搞定
        System.arraycopy(ar,0,a3,3,ar.length);
        //ar=a3
        System.out.println(Arrays.toString(a3));
        System.out.println(">>>>>>>>>>>>>>>>>>>");
        System.arraycopy(ar,0,ar,3,2);
        System.out.println(Arrays.toString(ar));
    }
}
